package com.example.springboot.test;

public class Director {
    private Build build;
    public Director(Build build){
        this.build=build;
    }
    public void buildProduct(){
        build.buildHeader();
        build.buildBody();
        build.buildFooter();
    }
    public Product build(){
       return build.build();
    }

    public static void main(String[] args) {
        ConcreteBuildB concreteBuild=new ConcreteBuildB();
        Director director=new Director(concreteBuild);
        director.buildProduct();
        Product product=director.build();
        System.out.println();
    }
}
